<!-- 内容与show.html foreach段一致 -->
<tr user_id="<{$u.id}>">
	<td><{$u.id}></td>
	<td><{$u.account}></td>
	<td><{$u.name}></td>
	<td><{$u.email}></td>
	<td dept_id="<{$u.dept_id}>"><{$u.dept_name}></td>
	<td class="nobr">
        <{php}>
            $u = $this->get_template_vars('u');
            $this->assign('_roles', RoleHelper::getByUser($u['id']));
            $this->assign('hasRole', UserPrivHelper::check('role'));
        <{/php}>
        <{foreach item=_rname key=_rid from=$_roles}>
            <{if $hasRole}>
                <div><a href='role-modify/id/<{$_rid}>'><{$_rname}></a></div>
            <{else}>
                <div><{$_rname}></div>
            <{/if}>
        <{/foreach}>
	</td>
	<td><div class="disa_<{$u.is_disa}>" is_disa="<{$u.is_disa}>" user_id="<{$u.id}>"></div></td>
	<td><{$u.addtime|date_format:"%Y/%m/%d"}></td>
	<td>
        <a href="user-role/id/<{$u.id}>">权限</a>
		<a href="javascript:;" onclick="modify('<{$u.id}>')">修改</a>
	</td>
</tr>
<script> $('div[user_id="<{$u.id}>"]').click(switch_disa); </script>

